package com.hisense.ovcloud.warehouse.entity.julinkwarehouse;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("device_warehouse")
public class DeviceWarehouse implements Serializable {
    @Id(keyType = KeyType.Auto)
    private String id;
    @Column(value = "domain")
    private String domain;
    @Column(value = "sub_domain")
    private String sub_domain;
    @Column(value = "device_id")
    private String device_id;
    @Column(value = "public_key")
    private String public_key;
    @Column(value = "status")
    private Integer status = 1;
    @Column(value = "batch_code")
    private String batch_code;
    @Column(value = "sharding_key")
    private long sharding_key;
    @Column(value = "pem_version")
    private int pem_version;

    @Column(value = "create_time", onInsertValue = "now()")
    private Timestamp create_time;
    @Column(value = "update_time", onUpdateValue = "now()")
    private Timestamp update_time;
    @Column(value = "del_flag")
    private int del_flag = 0;
}
